VC20MkTime

Passing the reference to a CALENDAR device the VC20MkTime function gives the number of seconds elapsed from 1 January 00:00 of 1970 (Epoch Time) until the date introduced.
This data is useful to be able to make comparisons between dates.
The function also runs day and month values greater than its natural limits (day > 31 or month > 12), automatically calculating the date.

IMPLEMENTAZIONE

VC20MkTime (calendar, errorCode, seconds, dayOfWeek, dayOfYear )

Parametri:

IN/OUT TIPO VARIABILE NOME DI ESEMPIO DIM
IN CALENDAR calendar (INTDEVICE) - Riferimento ad un device CALENDAR
OUT GLOBAL errorCode B Codice d'errore:
0 = Nessuno
1 = Giorno ≤ 0
2 = Mese ≤ 0
3 = Anno introdotto fuori limiti [1970÷2037]
OUT GLOBAL seconds L Somma dei secondi trascorsi dalle 00:00 del 1°gennaio 1970 fino alla data introdotta
OUT GLOBAL dayOfWeek B Giorno della settimana:
0 = domenica
1 = lunedì
2 = martedì
3 = mercoledì
4 = giovedì
5 = venerdì
6 = sabato
OUT GLOBAL dayOfYear W Numero di giorni passati rispetto al 1° gennaio dell'anno introdotto

Esempio

Si vuole attivare una uscita digitale (ofUscita01) quando la data e l'ora attuale supera una data e un'ora impostata precedentemente.